<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    .h1{
    color: red;
    margin-left:auto;
    margin-right:auto;}

    </style>
</head>
<body>
<span id="txt" class="h1">欢迎光临四川乐山火车站</span>
<script type="text/javascript">
        function show() {
        var txt = document.getElementById("txt");
        var datastirng=txt.innerHTML;
        txt.style.color = "red";
        txt.style.fontSize = "20px";
        txt.style.fontWeight = "bold";
        console.log(txt);

        var firstchar = datastirng[0];
        var otherstring = datastirng.substring(1, datastirng.length);
        var newstring =  otherstring + firstchar;

        txt.innerHTML = newstring;}

        setInterval(show,1000);

</script>


</body>
</html>